<template>
  <div class="container enroll">
    <!-- 列表 -->
    <div>
      <recommend
        key="recommend"
        :list="list"
      />
    </div>
  </div>
</template>

<script>
import Recommend from '@/components/home/recommend'
export default {
  components: {
    Recommend
  },

  data () {
    return {
      list: [{
        id: 1,
        title: '12年前发明“熊猫烧香”病毒的网络天才，坐4年牢后，现状如何？',
        description: '微观影1视 1小时前 102评论',
        format: 'default',
        medias: [
          {
            path: 'http://oss.youmbe.com/attachments/temp/01.jpg',
            format: 'video'
          }
        ],
        mplink: ''
      },
      {
        id: 2,
        title: '济南东部房价“喋喋不休”，西部房价依然坚挺，为何？',
        description: '济南楼市 1小时前 102评论',
        format: 'default',
        medias: [
          {
            path: 'http://oss.youmbe.com/attachments/temp/02.jpg',
            format: 'video'
          }
        ],
        mplink: ''
      },
      {
        id: 3,
        title: '心寒！市民主动清理黑衣人设置的路障 被暴徒用重器猛击头部',
        description: '环球网国内 7小时前 21评论',
        format: 'default',
        medias: [],
        mplink: ''
      },
      {
        id: 4,
        title: '32核心64线程 AMD锐龙Threadripper 3970X评测',
        description: '中关村在线 12-01 05:27 21评论',
        format: 'default',
        medias: [
          {
            path: 'http://oss.youmbe.com/attachments/temp/03.jpg',
            format: 'image'
          }
        ],
        mplink: ''
      },
      {
        id: 5,
        title: '32核心64线程 AMD锐龙Threadripper 3970X评测',
        description: '中关村在线 12-01 05:27 21评论',
        format: 'default',
        medias: [
          {
            path: 'http://oss.youmbe.com/attachments/temp/03.jpg',
            format: 'image'
          }
        ],
        mplink: ''
      },
      {
        id: 6,
        title: '国庆七十周年阅兵 显国威、振军威',
        description: '凤凰网 10-01 10:27 12,321评论',
        format: 'default',
        medias: [
          {
            path: 'http://oss.youmbe.com/attachments/temp/11.jpg',
            format: 'image'
          }
        ],
        mplink: ''
      }]
    }
  },
  onShow () {
    this.onLoadData()
  },
  methods: {
    onLoadData () {
      console.log('test')
    //   getHomeApi().then(res => {
    //     const {banner, menus} = res
    //     if (banner) {
    //       this.banner = banner
    //     }
    //     if (menus) {
    //       this.menus = menus
    //     }
    //   })
    }
  }
  // onShareAppMessage (res) {
  //   if (res.from === 'button') {
  //     return null
  //   }
  //   return getShareData('app')
  // },
  // onShareTimeline (res) {
  //   if (res.from === 'button') {
  //     return null
  //   }
  //   return getShareData('timeline')
  // }
}
</script>

<style lang="less">
// .scroll-body {
//   height: 100vh;
//   margin-top: -10px;
// }
</style>
